On Thu, 12 Sep 2013, Diego Biurrun wrote:

On Wed, Sep 11, 2013 at 10:14:07PM -0400, Stephen Hutchinson wrote:

+static void avisynth_next_stream(AVFormatContext *s, AVStream **st,
+                                 AVPacket *pkt, int *discard)
+{
+    AviSynthContext *avs = s->priv_data;
+
+    pkt->stream_index = avs->curr_stream++;
+    avs->curr_stream %= s->nb_streams;
+
+    *st = s->streams[pkt->stream_index];
+    if ((*st)->discard == AVDISCARD_ALL)
+        *discard = 1;
+    else
+        *discard = 0;
+
+    return;
 }

You pass st as **, but dereference it on each use.  Why not pass it as
a simple pointer to begin with?

Because "*st = foo" won't have any effect on the caller if you'd do that.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to