summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-25 17:06:33 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-25 17:16:14 +0200
commit6d35aba167a2333367298fced3724b16261dcdf9 (patch)
tree76727f8ca7414cbf9ae239d071d2aceb84352598
parent2497914a1846c1dbcfb853ea834da0038f0e22f5 (diff)
avformat/img2dec: initialize pkt->pos for image pipes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/img2dec.c3
-rw-r--r--tests/ref/fate/exif-image-tiff2
-rw-r--r--tests/ref/fate/exif-image-webp2
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