[FFmpeg-soc] [soc]: r5094 - concat/libavformat/utils.c.diff
gkovacs
subversion at mplayerhq.hu
Thu Aug 13 22:32:51 CEST 2009
Author: gkovacs
Date: Thu Aug 13 22:32:51 2009
New Revision: 5094
Log:
no need to modify av_read_frame_internal since AVStream->index already contains the global stream index
Modified:
concat/libavformat/utils.c.diff
Modified: concat/libavformat/utils.c.diff
==============================================================================
--- concat/libavformat/utils.c.diff Thu Aug 13 22:27:42 2009 (r5093)
+++ concat/libavformat/utils.c.diff Thu Aug 13 22:32:51 2009 (r5094)
@@ -1,5 +1,5 @@
diff --git a/libavformat/utils.c b/libavformat/utils.c
-index 0c1a50d..c9ea489 100644
+index 0c1a50d..01824dd 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -27,6 +27,7 @@
@@ -46,40 +46,3 @@ index 0c1a50d..c9ea489 100644
/* Do not open file if the format does not need it. XXX: specific
hack needed to handle RTSP/TCP */
if (!fmt || !(fmt->flags & AVFMT_NOFILE)) {
-@@ -910,6 +933,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
- {
- AVStream *st;
- int len, ret, i;
-+ int stream_index = 0;
-
- av_init_packet(pkt);
-
-@@ -943,8 +967,8 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
- /* return packet if any */
- if (pkt->size) {
- got_packet:
-+ pkt->stream_index = stream_index;
- pkt->duration = 0;
-- pkt->stream_index = st->index;
- pkt->pts = st->parser->pts;
- pkt->dts = st->parser->dts;
- pkt->pos = st->parser->pos;
-@@ -968,6 +992,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
- AVPacket cur_pkt;
- /* read next packet */
- ret = av_read_packet(s, &cur_pkt);
-+ stream_index = cur_pkt.stream_index;
- if (ret < 0) {
- if (ret == AVERROR(EAGAIN))
- return ret;
-@@ -980,8 +1005,9 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
- NULL, 0,
- AV_NOPTS_VALUE, AV_NOPTS_VALUE,
- AV_NOPTS_VALUE);
-- if (pkt->size)
-+ if (pkt->size) {
- goto got_packet;
-+ }
- }
- }
- /* no more packets: really terminate parsing */
More information about the FFmpeg-soc
mailing list