On Sun, Oct 18, 2015 at 12:24:06AM +0200, Marton Balint wrote: > Signed-off-by: Marton Balint <c...@passwd.hu> > --- > ffmpeg.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/ffmpeg.c b/ffmpeg.c > index 3a36af7..f6947f8 100644 > --- a/ffmpeg.c > +++ b/ffmpeg.c > @@ -1925,13 +1925,20 @@ int guess_input_channel_layout(InputStream *ist) > return 1; > } > > -static void check_decode_result(int *got_output, int ret) > +static void check_decode_result(int *got_output, int ret, AVFrame *frame) > { > if (*got_output || ret<0) > decode_error_stat[ret<0] ++; > > if (ret < 0 && exit_on_error) > exit_program(1); > + > + if (exit_on_error && *got_output && frame) { > + if (av_frame_get_decode_error_flags(frame) || (frame->flags & > AV_FRAME_FLAG_CORRUPT)) { > + av_log(NULL, AV_LOG_FATAL, "Corrupt decoded frame\n");
this too should give some indication of which stream/filename was failing unless something else already prints that information [...] > @@ -3770,6 +3777,11 @@ static int process_input(int file_index) > if (ist->discard) > goto discard_packet; > > + if (exit_on_error && (pkt.flags & AV_PKT_FLAG_CORRUPT)) { > + av_log(NULL, AV_LOG_FATAL, "Corrupt input packet\n"); same suggestion [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel