]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Do not set timestamp information for a non existing AVStream
authorlucabe <lucabe@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 22 Aug 2008 19:03:05 +0000 (19:03 +0000)
committerlucabe <lucabe@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 22 Aug 2008 19:03:05 +0000 (19:03 +0000)
(fix a bug in the RTP demuxer)

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

libavformat/rtpdec.c

index 3500cad717a9cf67d53c8628030c38fd8fcf4459..70b29e73dde4168b654e101d4f4409126fb1a810 100644 (file)
@@ -281,7 +281,6 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r
     s->st = st;
     s->rtp_payload_data = rtp_payload_data;
     rtp_init_statistics(&s->statistics, 0); // do we know the initial sequence from sdp?
-    av_set_pts_info(s->st, 32, 1, 90000);
     if (!strcmp(ff_rtp_enc_name(payload_type), "MP2T")) {
         s->ts = mpegts_parse_open(s->ic);
         if (s->ts == NULL) {
@@ -289,6 +288,7 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r
             return NULL;
         }
     } else {
+        av_set_pts_info(st, 32, 1, 90000);
         switch(st->codec->codec_id) {
         case CODEC_ID_MPEG1VIDEO:
         case CODEC_ID_MPEG2VIDEO: