[FFmpeg-cvslog] r21480 - trunk/ffmpeg.c
michael
subversion
Wed Jan 27 14:27:18 CET 2010
Author: michael
Date: Wed Jan 27 14:27:18 2010
New Revision: 21480
Log:
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.
Modified:
trunk/ffmpeg.c
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c Wed Jan 27 14:18:08 2010 (r21479)
+++ trunk/ffmpeg.c Wed Jan 27 14:27:18 2010 (r21480)
@@ -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->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 */
More information about the ffmpeg-cvslog
mailing list