summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-27 13:27:18 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-27 13:27:18 +0000
commit3ff0daf06d6480c5f4518be2ee7814b4b7939413 (patch)
treeb8623395128747a01115d68f29fe968bd127db37 /ffmpeg.c
parent8670f84cf9272e7895d35c9d471234bd5cd7e2a9 (diff)
Print "Multiple frames in a packet" warning independant of CODEC_CAP_SUBFRAMES
because CODEC_CAP_SUBFRAMES is primarely misused to hide this warning otherwise which renders the flag completely useless. Originally committed as revision 21480 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 011b083ce2..159834449a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -299,6 +299,7 @@ typedef struct AVInputStream {
is not defined */
int64_t pts; /* current pts */
int is_start; /* is 1 at the start and after a discontinuity */
+ int showed_multi_packet_warning;
} AVInputStream;
typedef struct AVInputFile {
@@ -1312,8 +1313,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
ist->pts= ist->next_pts;
if(avpkt.size && avpkt.size != pkt->size &&
- !(ist->st->codec->codec->capabilities & CODEC_CAP_SUBFRAMES) && verbose>0)
+ (!ist->showed_multi_packet_warning && verbose>0 || verbose>1)){
fprintf(stderr, "Multiple frames in a packet from stream %d\n", pkt->stream_index);
+ ist->showed_multi_packet_warning=1;
+ }
/* decode the packet if needed */
decoded_data_buf = NULL; /* fail safe */