On 17/2/22 02:54, p...@sandflow.com wrote:
                  av_log(s,
                         AV_LOG_DEBUG,
                         "Switch resource on track %d: re-open context\n",
                         track->index);
-                if (open_track_resource_context(s, &(track->resources[i])) != 
0)
-                    return NULL;
+
+                ret = open_track_resource_context(s, &(track->resources[i]));

Nit: "track->resources + i" is easier to read imo

+                if (ret != 0)
+                    return ret;
                  if (track->current_resource_index > 0)
                      
avformat_close_input(&track->resources[track->current_resource_index].ctx);
                  track->current_resource_index = i;
              }
- return &(track->resources[track->current_resource_index]);
+            *resource = &(track->resources[track->current_resource_index]);

Nit: track->resources + track->current_resource_index



The rest lgtm.

Will apply (with nits fixed) in a few days of no objections.

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to