diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-25 17:06:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-04 23:52:28 +0200 |
commit | 1d109974880907d5c543c7e78f208c1c2534b6bb (patch) | |
tree | 413e9b24d9a2767237b8ee8d65f936e139797836 | |
parent | 76a5cf1f80a23316b02ab52f9459159b8efec84a (diff) | |
download | ffmpeg-1d109974880907d5c543c7e78f208c1c2534b6bb.tar.gz |
avformat/img2dec: initialize pkt->pos for image pipes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6d35aba167a2333367298fced3724b16261dcdf9)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/img2dec.c | 3 | ||||
-rw-r--r-- | tests/ref/fate/exif-image-tiff | 2 | ||||
-rw-r--r-- | 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 bb941268d6..c88db69782 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 515e3f186d..2b10529a08 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 d83feb2b59..88e3c82923 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 |