avformat/img2dec: initialize pkt->pos for image pipes
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 25 Sep 2014 15:06:33 +0000 (17:06 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 4 Oct 2014 21:52:28 +0000 (23:52 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6d35aba167a2333367298fced3724b16261dcdf9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/img2dec.c
tests/ref/fate/exif-image-tiff
tests/ref/fate/exif-image-webp

index bb94126..c88db69 100644 (file)
@@ -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]) {
index 515e3f1..2b10529 100644 (file)
@@ -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
index d83feb2..88e3c82 100644 (file)
@@ -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