]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Move add_to_pktbuf() before av_read_packet(). My future work on codec identification
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 12 Jul 2008 14:28:27 +0000 (14:28 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 12 Jul 2008 14:28:27 +0000 (14:28 +0000)
cleanup will need this.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14181 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/utils.c

index 22eae16ea002a593e9a5d0260181b96e183a051c..329228db92831d6da1fa75b4820234a171ccc2aa 100644 (file)
@@ -520,6 +520,22 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
 
 /*******************************************************/
 
+static AVPacket *add_to_pktbuf(AVPacketList **packet_buffer, AVPacket *pkt){
+    AVPacketList *pktl;
+    AVPacketList **plast_pktl= packet_buffer;
+
+    while(*plast_pktl) plast_pktl= &(*plast_pktl)->next; //FIXME maybe maintain pointer to the last?
+
+    pktl = av_mallocz(sizeof(AVPacketList));
+    if (!pktl)
+        return NULL;
+
+    /* add the packet in the buffered packet list */
+    *plast_pktl = pktl;
+    pktl->pkt= *pkt;
+    return &pktl->pkt;
+}
+
 int av_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
     int ret;
@@ -945,22 +961,6 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
     return 0;
 }
 
-static AVPacket *add_to_pktbuf(AVPacketList **packet_buffer, AVPacket *pkt){
-    AVPacketList *pktl;
-    AVPacketList **plast_pktl= packet_buffer;
-
-    while(*plast_pktl) plast_pktl= &(*plast_pktl)->next; //FIXME maybe maintain pointer to the last?
-
-    pktl = av_mallocz(sizeof(AVPacketList));
-    if (!pktl)
-        return NULL;
-
-    /* add the packet in the buffered packet list */
-    *plast_pktl = pktl;
-    pktl->pkt= *pkt;
-    return &pktl->pkt;
-}
-
 int av_read_frame(AVFormatContext *s, AVPacket *pkt)
 {
     AVPacketList *pktl;