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