libnut: Check nut_demuxer_init() return value.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-07 23:35:21 +01:00
parent 6f7f239604
commit e21f8a07ca

View File

@ -207,6 +207,9 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
nut_stream_header_tt * s;
int ret, i;
if(!nut)
return -1;
if ((ret = nut_read_headers(nut, &s, NULL))) {
av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(ret));
nut_demuxer_uninit(nut);