[FFmpeg-devel] [PATCH] lavf/matroskaenc: return an error for unsupported types.

Paul B Mahol onemda at gmail.com
Wed May 1 21:41:06 CEST 2013


On 5/1/13, Nicolas George <nicolas.george at normalesup.org> wrote:
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavformat/matroskaenc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> Printing the error and then ignoring it seems rather strahge in that
> context, but maybe I am missing something.
>
> FATE still succeeds, of course.
>
>
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 6726fd9..c34be41 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -698,7 +698,7 @@ static int mkv_write_tracks(AVFormatContext *s)
>                  break;
>              default:
>                  av_log(s, AV_LOG_ERROR, "Only audio, video, and subtitles
> are supported for Matroska.\n");
> -                break;
> +                return AVERROR(EINVAL);

Fonts too can be in...., so PATCHWELCOME?

>          }
>          ret = mkv_write_codecprivate(s, pb, codec, native_id, qt_id);
>          if (ret < 0) return ret;
> --
> 1.7.10.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list