comparison libmpdemux/demuxer.c @ 36158:749f1c5c4267

Make parser allocation work if a codec was forced.
author reimar
date Thu, 09 May 2013 07:24:34 +0000
parents 389d43c448b3
children 6f0ab9dd1429
comparison
equal deleted inserted replaced
36157:868f3a141dca 36158:749f1c5c4267
30 #include "config.h" 30 #include "config.h"
31 #include "mp_msg.h" 31 #include "mp_msg.h"
32 #include "help_mp.h" 32 #include "help_mp.h"
33 #include "m_config.h" 33 #include "m_config.h"
34 #include "mpcommon.h" 34 #include "mpcommon.h"
35 #include "codec-cfg.h"
35 36
36 #include "libvo/fastmemcpy.h" 37 #include "libvo/fastmemcpy.h"
37 38
38 #include "stream/stream.h" 39 #include "stream/stream.h"
39 #include "demuxer.h" 40 #include "demuxer.h"
559 *parser = sh->parser; 560 *parser = sh->parser;
560 if (*parser) 561 if (*parser)
561 return; 562 return;
562 563
563 allocate_parser(avctx, parser, sh->format); 564 allocate_parser(avctx, parser, sh->format);
565 if (!*parser && sh->codec) // fallback to support forcing a codec
566 allocate_parser(avctx, parser, sh->codec->fourcc[0]);
564 sh->avctx = *avctx; 567 sh->avctx = *avctx;
565 sh->parser = *parser; 568 sh->parser = *parser;
566 } 569 }
567 570
568 int ds_parse(demux_stream_t *ds, uint8_t **buffer, int *len, double pts, off_t pos) 571 int ds_parse(demux_stream_t *ds, uint8_t **buffer, int *len, double pts, off_t pos)