aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-18 03:02:36 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-11-18 15:17:45 +0100
commitcebad79898a4b65d7c7ca66ba21a6cdb66e7bbd1 (patch)
tree128776ac4123961d6d22bdb4dc809829c228a469
parent0227ecc21f1a1247a5a55da1a3628283f606837b (diff)
downloadffmpeg-cebad79898a4b65d7c7ca66ba21a6cdb66e7bbd1.tar.gz
avformat/utils: dont count attached pics toward the probesize
Such pics behave more like headers which we also dont count. Fixes Ticket3146 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit a8dec360c5db15e8da4b44ff3c0f02a6c57e8ac0)
-rw-r--r--libavformat/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e5fbc4b6c5..18a0165dbc 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2702,9 +2702,10 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
goto find_stream_info_err;
}
- read_size += pkt->size;
-
st = ic->streams[pkt->stream_index];
+ if (!(st->disposition & AV_DISPOSITION_ATTACHED_PIC))
+ read_size += pkt->size;
+
if (pkt->dts != AV_NOPTS_VALUE && st->codec_info_nb_frames > 1) {
/* check for non-increasing dts */
if (st->info->fps_last_dts != AV_NOPTS_VALUE &&