Commit 403b9015 authored by michael's avatar michael

Pass AVPacketList instead of the whole context to add_to_pktbuf. As thats

all that is needed.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14179 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent faaefb90
...@@ -931,9 +931,9 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt) ...@@ -931,9 +931,9 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
return 0; return 0;
} }
static AVPacket *add_to_pktbuf(AVFormatContext *s, AVPacket *pkt){ static AVPacket *add_to_pktbuf(AVPacketList **packet_buffer, AVPacket *pkt){
AVPacketList *pktl= s->packet_buffer; AVPacketList *pktl;
AVPacketList **plast_pktl= &s->packet_buffer; AVPacketList **plast_pktl= packet_buffer;
while(*plast_pktl) plast_pktl= &(*plast_pktl)->next; //FIXME maybe maintain pointer to the last? 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) ...@@ -991,7 +991,7 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
return ret; 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); return AVERROR(ENOMEM);
}else{ }else{
assert(!s->packet_buffer); assert(!s->packet_buffer);
...@@ -1984,7 +1984,7 @@ int av_find_stream_info(AVFormatContext *ic) ...@@ -1984,7 +1984,7 @@ int av_find_stream_info(AVFormatContext *ic)
break; break;
} }
pkt= add_to_pktbuf(ic, &pkt1); pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1);
if(av_dup_packet(pkt) < 0) if(av_dup_packet(pkt) < 0)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment