[FFmpeg-cvslog] avformat/img2dec: initialize pkt->pos for image pipes
Michael Niedermayer
git at videolan.org
Sun Oct 5 00:32:24 CEST 2014
ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 25 17:06:33 2014 +0200| [1d109974880907d5c543c7e78f208c1c2534b6bb] | committer: Michael Niedermayer
avformat/img2dec: initialize pkt->pos for image pipes
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 6d35aba167a2333367298fced3724b16261dcdf9)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1d109974880907d5c543c7e78f208c1c2534b6bb
---
libavformat/img2dec.c | 3 +++
tests/ref/fate/exif-image-tiff | 2 +-
tests/ref/fate/exif-image-webp | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index bb94126..c88db69 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -450,6 +450,9 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
pkt->pts = s->pts;
}
+ if (s->is_pipe)
+ pkt->pos = avio_tell(f[0]);
+
pkt->size = 0;
for (i = 0; i < 3; i++) {
if (f[i]) {
diff --git a/tests/ref/fate/exif-image-tiff b/tests/ref/fate/exif-image-tiff
index 515e3f1..2b10529 100644
--- a/tests/ref/fate/exif-image-tiff
+++ b/tests/ref/fate/exif-image-tiff
@@ -9,7 +9,7 @@ best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=1
pkt_duration_time=0.040000
-pkt_pos=N/A
+pkt_pos=0
pkt_size=67604
width=200
height=112
diff --git a/tests/ref/fate/exif-image-webp b/tests/ref/fate/exif-image-webp
index d83feb2..88e3c82 100644
--- a/tests/ref/fate/exif-image-webp
+++ b/tests/ref/fate/exif-image-webp
@@ -9,7 +9,7 @@ best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=1
pkt_duration_time=0.040000
-pkt_pos=N/A
+pkt_pos=0
pkt_size=39276
width=400
height=225
More information about the ffmpeg-cvslog
mailing list