[FFmpeg-devel] [PATCH 3/3] movenc: use ff_alloc_extradata()

Paul B Mahol onemda at gmail.com
Mon Oct 14 19:33:30 CEST 2013


On 10/13/13, James Almer <jamrial at gmail.com> wrote:
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/movenc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 60c028e..3296762 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -3507,10 +3507,8 @@ static int mov_create_chapter_track(AVFormatContext
> *s, int tracknum)
>  #if 0
>      // These properties are required to make QT recognize the chapter
> track
>      uint8_t chapter_properties[43] = { 0, 0, 0, 0, 0, 0, 0, 1, };
> -    track->enc->extradata = av_malloc(sizeof(chapter_properties));
> -    if (track->enc->extradata == NULL)
> +    if (ff_alloc_extradata(track->enc, sizeof(chapter_properties)))
>          return AVERROR(ENOMEM);
> -    track->enc->extradata_size = sizeof(chapter_properties);
>      memcpy(track->enc->extradata, chapter_properties,
> sizeof(chapter_properties));
>  #else
>      if (avio_open_dyn_buf(&pb) >= 0) {
> --
> 1.8.1.5
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

As you can see this is dead code.


More information about the ffmpeg-devel mailing list