aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-12 14:28:27 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-12 14:28:27 +0000
commit9d3b9f2cceca2ca3670a6b80cfc1b4d0f09ff6d1 (patch)
treed69eaf61d1e6f79b382dde3626f421f892cc90c3
parent64cd3108dfc400dc456975ae893d313b6088e59b (diff)
downloadffmpeg-9d3b9f2cceca2ca3670a6b80cfc1b4d0f09ff6d1.tar.gz
Move add_to_pktbuf() before av_read_packet(). My future work on codec identification
cleanup will need this. Originally committed as revision 14181 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/utils.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 22eae16ea0..329228db92 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;