[FFmpeg-devel] [PATCH] avformat/matroskaenc: add allow_raw_vfw and disable it by default

James Almer jamrial at gmail.com
Sat Feb 14 18:12:15 CET 2015


On 14/02/15 12:20 PM, Michael Niedermayer wrote:
> Based on complaint by wm4
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavformat/matroskaenc.c |   14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index eb6e859..fc6371b 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -123,6 +123,8 @@ typedef struct MatroskaMuxContext {
>  
>      uint32_t chapter_id_offset;
>      int wrote_chapters;
> +
> +    int allow_raw_vfw;
>  } MatroskaMuxContext;
>  
>  
> @@ -879,8 +881,15 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
>                  break;
>              }
>          }
> -        if (codec->codec_id == AV_CODEC_ID_RAWVIDEO && !codec->codec_tag)
> -            native_id = 0;
> +        if (codec->codec_id == AV_CODEC_ID_RAWVIDEO && !codec->codec_tag) {
> +            if (mkv->allow_raw_vfw) {
> +                native_id = 0;
> +            } else {
> +                av_log(s, AV_LOG_ERROR, "Raw RGB is not supported nativly in Matroska, you can use AVI or NUT or\n"

Natively


More information about the ffmpeg-devel mailing list