[FFmpeg-devel] [PATCH] specify a name/description per stream
Baptiste Coudurier
baptiste.coudurier
Wed Aug 27 19:51:15 CEST 2008
Hi,
Aurelien Jacobs wrote:
> Hi,
>
> Attached patch allows muxers/demxuers to associate a name/description to
> each AVStream. OK to apply ?
>
> Aurel
>
>
> ------------------------------------------------------------------------
>
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c (revision 14980)
> +++ ffmpeg.c (working copy)
> @@ -139,6 +139,7 @@
> static int intra_dc_precision = 8;
> static int loop_input = 0;
> static int loop_output = AVFMT_NOOUTPUTLOOP;
> +static char *video_name = NULL;
> static int qp_hist = 0;
>
> static int intra_only = 0;
> @@ -149,10 +150,12 @@
> static int audio_channels = 1;
> static char *audio_codec_name = NULL;
> static int audio_codec_tag = 0;
> +static char *audio_name = NULL;
> static char *audio_language = NULL;
>
> static int subtitle_disable = 0;
> static char *subtitle_codec_name = NULL;
> +static char *subtitle_name = NULL;
> static char *subtitle_language = NULL;
>
> static float mux_preload= 0.5;
> @@ -391,6 +394,7 @@
> url_fclose(s->pb);
> for(j=0;j<s->nb_streams;j++) {
> av_free(s->streams[j]->codec);
> + av_free(s->streams[j]->name);
> av_free(s->streams[j]);
> }
Unrelated but isnt't it time for a av_close_output_file ?
> [...]
>
> Index: libavformat/avformat.h
> ===================================================================
> --- libavformat/avformat.h (revision 14980)
> +++ libavformat/avformat.h (working copy)
> @@ -409,6 +409,8 @@
> * - decoding: Set by libavformat.
> */
> AVRational sample_aspect_ratio;
> +
> + char *name; /**< name/description of the track */
> } AVStream;
Maybe char name[1024] is preferrable, like all other metadata in
AVFormatContext ?
[...]
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
More information about the ffmpeg-devel
mailing list