[FFmpeg-trac] #9190(avformat:new): dashenc creates web-unplayable files with copied opus streams
FFmpeg
trac at avcodec.org
Thu Apr 15 06:42:53 EEST 2021
#9190: dashenc creates web-unplayable files with copied opus streams
--------------------------------------+------------------------------------
Reporter: aphysically | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: dash dashenc | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------------+------------------------------------
Changes (by jamrial):
* component: undetermined => avformat
Comment:
Can you apply this patch and re-run the command line to create
dash/dashbad, to see if it fixes it?
{{{
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 6e0d9d7496..cc4a9e6f62 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2018,7 +2018,6 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc,
AVStream *st, int stream_type
if (!st->codecpar->extradata)
return AVERROR(ENOMEM);
- st->codecpar->extradata_size =
sizeof(opus_default_extradata);
memcpy(st->codecpar->extradata, opus_default_extradata,
sizeof(opus_default_extradata));
channel_config_code = get8(pp, desc_end);
@@ -2030,8 +2029,10 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc,
AVStream *st, int stream_type
st->codecpar->extradata[19] =
opus_stream_cnt[channel_config_code];
st->codecpar->extradata[20] =
opus_coupled_stream_cnt[channel_config_code];
memcpy(&st->codecpar->extradata[21],
opus_channel_map[channels - 1], channels);
+ st->codecpar->extradata_size = 19 +
(st->codecpar->extradata[18] ? 2 + channels : 0);
} else {
avpriv_request_sample(fc, "Opus in MPEG-TS -
channel_config_code > 0x8");
+ st->codecpar->extradata_size =
sizeof(opus_default_extradata);
}
st->need_parsing = AVSTREAM_PARSE_FULL;
st->internal->need_context_update = 1;
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9190#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list