summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-12 13:15:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-12 13:15:00 +0000
commit3179da621a49af4b056bea52d63d6f55644c4bb3 (patch)
treeb4b3732b8330d86377c113b259697df464687a06 /libavformat/utils.c
parentd08e3e91af7238db491d9a9b7c83827ac127ccb3 (diff)
Pass AVPacketList instead of the whole context to add_to_pktbuf as that is
all that is needed. Originally committed as revision 14179 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 20df8b7d7b..90f160cd42 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -931,9 +931,9 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
return 0;
}
-static AVPacket *add_to_pktbuf(AVFormatContext *s, AVPacket *pkt){
- AVPacketList *pktl= s->packet_buffer;
- AVPacketList **plast_pktl= &s->packet_buffer;
+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?
@@ -991,7 +991,7 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
return ret;
}
- if(av_dup_packet(add_to_pktbuf(s, pkt)) < 0)
+ if(av_dup_packet(add_to_pktbuf(&s->packet_buffer, pkt)) < 0)
return AVERROR(ENOMEM);
}else{
assert(!s->packet_buffer);
@@ -1984,7 +1984,7 @@ int av_find_stream_info(AVFormatContext *ic)
break;
}
- pkt= add_to_pktbuf(ic, &pkt1);
+ pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1);
if(av_dup_packet(pkt) < 0)
return AVERROR(ENOMEM);