[FFmpeg-devel] [PATCH]lavf/mpegtsenc: Automatically insert dump_extra for asp muxing
Michael Niedermayer
michael at niedermayer.cc
Tue Nov 8 14:05:45 EET 2016
On Tue, Nov 08, 2016 at 12:25:00PM +0100, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch allows automatic insertion of dump_extra when
> remuxing mpeg4 asp.
>
> Please comment, Carl Eugen
> mpegtsenc.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
> 071687a7d12bb9b78df360193b991c01677ba8c1 0001-lavf-mpegtsenc-Automatically-insert-dump_extra-for-a.patch
> From 8ff75d4fa9127f3f02dde9408795f27c8d0e9c2c Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> Date: Tue, 8 Nov 2016 12:22:26 +0100
> Subject: [PATCH] lavf/mpegtsenc: Automatically insert dump_extra for asp
> muxing.
>
> ---
> libavformat/mpegtsenc.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index 71a6642..9e98fd2 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -28,6 +28,7 @@
> #include "libavutil/opt.h"
>
> #include "libavcodec/internal.h"
> +#include "libavcodec/mpeg4video.h"
>
> #include "avformat.h"
> #include "avio_internal.h"
> @@ -1823,8 +1824,12 @@ static int mpegts_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt
> (st->codecpar->extradata_size > 0 &&
> st->codecpar->extradata[0] == 1)))
> ret = ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL);
> + } else if (st->codecpar->codec_id == AV_CODEC_ID_MPEG4) {
> + if (pkt->size >= 5 && AV_RB32(pkt->data) != VOS_STARTCODE &&
> + st->codecpar->extradata_size >= 5 &&
> + AV_RB32(st->codecpar->extradata) == VOS_STARTCODE)
this should search both for the startcode and not use fixed locations
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161108/1e46855e/attachment.sig>
More information about the ffmpeg-devel
mailing list