[FFmpeg-devel] [PATCH] Ogg demuxer: give meaningful error codes and warnings

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Apr 15 19:54:20 CEST 2011


On Fri, Apr 15, 2011 at 07:46:22PM +0200, Nicolas George wrote:
> @@ -346,6 +350,7 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
>              if (os->header < 0){
>                  os->codec = ogg_find_codec (os->buf, os->bufpos);
>                  if (!os->codec){
> +                    av_log(s, AV_LOG_WARNING, "Codec not found\n");

That is a bit unrelated, I don't think it's well to mix that in.
Also the message isn't really great.

> -    if (ogg_get_headers (s) < 0){
> -        return -1;
> +    ret = ogg_get_headers (s);
> +    if (ret < 0){
> +        return ret;
>      }

I'd get rid of the {}


More information about the ffmpeg-devel mailing list