[FFmpeg-devel] avformat/movenc: allow rewriting extradata

James Almer jamrial at gmail.com
Wed Aug 17 22:58:27 EEST 2016


On 8/17/2016 3:59 PM, Umair Khan wrote:
> Hi,
> 
> Patch attached.
> 
> I hope this is the cleanest solution. :)
> 
> - Umair
> 
> 
> patch.diff
> 
> 
> From be04357d54897173b1776ed92ab8347b3cdffd46 Mon Sep 17 00:00:00 2001
> From: Umair Khan <omerjerk at gmail.com>
> Date: Thu, 18 Aug 2016 00:27:42 +0530
> Subject: [PATCH] avformat/movenc: allow rewriting extradata
> 
> Signed-off-by: Umair Khan <omerjerk at gmail.com>
> ---
>  libavformat/movenc.c | 30 ++++++++++++++++++++++++++++++
>  libavformat/movenc.h |  2 ++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 14db880..b33f24c 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -4919,6 +4919,19 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt)
>                      trk->start_cts = pkt->pts - pkt->dts;
>                  else
>                      trk->start_cts = 0;
> +            }       
> +
> +            if (trk->par->codec_id == AV_CODEC_ID_MP4ALS) {
> +                int side_size = 0;
> +                uint8_t *side = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size);
> +                av_log(s, AV_LOG_ERROR, "side_size = %d\n", side_size);

I'm not sure this is useful at all, but if you think it is
then make it either AV_ERROR_VERBOSE or AV_ERROR_DEBUG.



More information about the ffmpeg-devel mailing list