rtmpproto: Consistently use the right prev_pkt array
authorMartin Storsjö <martin@martin.st>
Tue, 17 Sep 2013 13:53:11 +0000 (16:53 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 17 Sep 2013 17:09:24 +0000 (20:09 +0300)
prev_pkt[0] is used for input packets, while prev_pkt[1] is
used for output.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmpproto.c

index e9814a3..1aff0c8 100644 (file)
@@ -406,7 +406,7 @@ static int read_connect(URLContext *s, RTMPContext *rt)
     GetByteContext gbc;
 
     if ((ret = ff_rtmp_packet_read(rt->stream, &pkt, rt->in_chunk_size,
-                                   rt->prev_pkt[1])) < 0)
+                                   rt->prev_pkt[0])) < 0)
         return ret;
     cp = pkt.data;
     bytestream2_init(&gbc, cp, pkt.size);