diff mbox series

[FFmpeg-devel,v3,2/4] avformat/imf: fix missing error reporting when opening resources

Message ID 20220203040745.10983-2-pal@sandflow.com
State New
Headers show
Series [FFmpeg-devel,v3,1/4] avformat/imf: open resources only when first needed | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Pierre-Anthony Lemieux Feb. 3, 2022, 4:07 a.m. UTC
From: Pierre-Anthony Lemieux <pal@palemieux.com>

---
 libavformat/imfdec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Zane van Iperen Feb. 16, 2022, 11:44 a.m. UTC | #1
On 3/2/22 14:07, pal@sandflow.com wrote:
> From: Pierre-Anthony Lemieux <pal@palemieux.com>
> 
> ---
>   libavformat/imfdec.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
> index e6a1020ecc..658ddc40f2 100644
> --- a/libavformat/imfdec.c
> +++ b/libavformat/imfdec.c
> @@ -550,7 +550,9 @@ static int set_context_streams_from_tracks(AVFormatContext *s)
>           AVStream *first_resource_stream;
>   
>           /* Open the first resource of the track to get stream information */
> -        open_track_resource_context(s, &c->tracks[i]->resources[0]);
> +        ret = open_track_resource_context(s, &c->tracks[i]->resources[0]);
> +        if (ret)
> +            return ret;
>           first_resource_stream = c->tracks[i]->resources[0].ctx->streams[0];
>           av_log(s, AV_LOG_DEBUG, "Open the first resource of track %d\n", c->tracks[i]->index);
>   

Can you please squash this into the previous patch?

The rest looks mostly okay.
Pierre-Anthony Lemieux Feb. 16, 2022, 4:54 p.m. UTC | #2
On Wed, Feb 16, 2022 at 3:45 AM Zane van Iperen <zane@zanevaniperen.com> wrote:
>
>
>
>
> On 3/2/22 14:07, pal@sandflow.com wrote:
> > From: Pierre-Anthony Lemieux <pal@palemieux.com>
> >
> > ---
> >   libavformat/imfdec.c | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
> > index e6a1020ecc..658ddc40f2 100644
> > --- a/libavformat/imfdec.c
> > +++ b/libavformat/imfdec.c
> > @@ -550,7 +550,9 @@ static int set_context_streams_from_tracks(AVFormatContext *s)
> >           AVStream *first_resource_stream;
> >
> >           /* Open the first resource of the track to get stream information */
> > -        open_track_resource_context(s, &c->tracks[i]->resources[0]);
> > +        ret = open_track_resource_context(s, &c->tracks[i]->resources[0]);
> > +        if (ret)
> > +            return ret;
> >           first_resource_stream = c->tracks[i]->resources[0].ctx->streams[0];
> >           av_log(s, AV_LOG_DEBUG, "Open the first resource of track %d\n", c->tracks[i]->index);
> >
>
> Can you please squash this into the previous patch?

Addressed by v4

>
> The rest looks mostly okay.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index e6a1020ecc..658ddc40f2 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -550,7 +550,9 @@  static int set_context_streams_from_tracks(AVFormatContext *s)
         AVStream *first_resource_stream;
 
         /* Open the first resource of the track to get stream information */
-        open_track_resource_context(s, &c->tracks[i]->resources[0]);
+        ret = open_track_resource_context(s, &c->tracks[i]->resources[0]);
+        if (ret)
+            return ret;
         first_resource_stream = c->tracks[i]->resources[0].ctx->streams[0];
         av_log(s, AV_LOG_DEBUG, "Open the first resource of track %d\n", c->tracks[i]->index);