1 Jul 2011 13:15
[PATCH] Pass down error code from muxer_lavf av_write_header
Tobias Diedrich <ranma+mplayer <at> tdiedrich.de>
2011-07-01 11:15:19 GMT
2011-07-01 11:15:19 GMT
The proper fix for the division by 0 when av_write_header failed is to pass down the error code and not try to write chunks with the muxer in a bad state. This changes the cont_write_header, muxer_flush and muxer_write_chunk prototypes to return an int (1 on success, 0 on failure) and adjusts all the calling sites. For mencoder I used a small wrapper that calls mencoder_exit if muxer_write_chunk fails, alternatively we could check the success at each call. TOOLS/vivodump.c | 5 ++++- help/help_mp-de.h | 2 +- help/help_mp-en.h | 2 +- help/help_mp-ja.h | 4 ++++ libmpcodecs/ve_lavc.c | 6 +++++- libmpcodecs/ve_libdv.c | 3 +-- libmpcodecs/ve_nuv.c | 6 +++--- libmpcodecs/ve_qtvideo.c | 6 +++++- libmpcodecs/ve_raw.c | 3 +-- libmpcodecs/ve_vfw.c | 3 +-- libmpcodecs/ve_x264.c | 3 ++- libmpcodecs/ve_xvid4.c | 13 ++++++------- libmpdemux/muxer.c | 29 ++++++++++++++++++++--------- libmpdemux/muxer.h | 6 +++--- libmpdemux/muxer_avi.c | 4 +++- libmpdemux/muxer_lavf.c | 6 ++++-- libmpdemux/muxer_mpeg.c | 4 ++-- libmpdemux/muxer_rawaudio.c | 4 ++--(Continue reading)
RSS Feed