mpegts: check that codec is not open in mpegts_find_stream_type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -598,6 +598,11 @@ static const StreamType DESC_types[] = {
|
|||||||
static void mpegts_find_stream_type(AVStream *st,
|
static void mpegts_find_stream_type(AVStream *st,
|
||||||
uint32_t stream_type, const StreamType *types)
|
uint32_t stream_type, const StreamType *types)
|
||||||
{
|
{
|
||||||
|
if (avcodec_is_open(st->codec)) {
|
||||||
|
av_log(NULL, AV_LOG_DEBUG, "cannot set stream info, codec is open\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (; types->stream_type; types++) {
|
for (; types->stream_type; types++) {
|
||||||
if (stream_type == types->stream_type) {
|
if (stream_type == types->stream_type) {
|
||||||
st->codec->codec_type = types->codec_type;
|
st->codec->codec_type = types->codec_type;
|
||||||
|
|||||||
Reference in New Issue
Block a user