[FFmpeg-devel] [PATCH 7/9] lavf/oggdec: remove inappropriate error message.

Clément Bœsch ubitux at gmail.com
Sat Sep 15 02:55:38 CEST 2012


On Sat, Sep 15, 2012 at 02:21:16AM +0200, Michael Niedermayer wrote:
> On Sat, Sep 15, 2012 at 01:20:46AM +0200, Clément Bœsch wrote:
> > idx contains the correct error code and will raise the appropriate
> > error message.
> > ---
> >  libavformat/oggdec.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
> > index 2c7bbd8..aed49a5 100644
> > --- a/libavformat/oggdec.c
> > +++ b/libavformat/oggdec.c
> > @@ -275,10 +275,8 @@ static int ogg_read_page(AVFormatContext *s, int *sid)
> >          } else {
> >              idx = ogg_new_stream(s, serial, 1);
> >          }
> > -        if (idx < 0) {
> > -            av_log (s, AV_LOG_ERROR, "failed to create stream (OOM?)\n");
> > +        if (idx < 0)
> >              return idx;
> > -        }
> 
> The reason for the failure would be printed but what failed
> (failed to create stream) would be lost i think
> 

OK. Patch dropped and replaced with the attached one on top of the
patchset.

[...]

-- 
Clément B.
-------------- next part --------------
From 0bb2fd8188c36c495b426fe9d65d6231ab05cf30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux at gmail.com>
Date: Sat, 15 Sep 2012 02:59:23 +0200
Subject: [PATCH 9/9] lavf/oggdec: reword stream creation error message.

---
 libavformat/oggdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 6615afb..2df8a5d 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -301,7 +301,7 @@ static int ogg_read_page(AVFormatContext *s, int *sid)
             idx = ogg_new_stream(s, serial);
 
         if (idx < 0) {
-            av_log (s, AV_LOG_ERROR, "failed to create stream (OOM?)\n");
+            av_log(s, AV_LOG_ERROR, "failed to create or replace stream\n");
             return idx;
         }
     }
-- 
1.7.12

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120915/4be558ad/attachment.asc>


More information about the ffmpeg-devel mailing list