diff utils.c @ 5914:ae90b07a6f29 libavformat

Add AVFMT_FLAG_NOFILLIN and AVFMT_FLAG_NOPARSE.
author michael
date Wed, 31 Mar 2010 12:55:16 +0000
parents 11bb10c37225
children 6cc73b15aa28
line wrap: on
line diff
--- a/utils.c	Wed Mar 31 12:29:58 2010 +0000
+++ b/utils.c	Wed Mar 31 12:55:16 2010 +0000
@@ -851,6 +851,9 @@
     int num, den, presentation_delayed, delay, i;
     int64_t offset;
 
+    if (s->flags & AVFMT_FLAG_NOFILLIN)
+        return;
+
     if((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
         pkt->dts= AV_NOPTS_VALUE;
 
@@ -1108,7 +1111,7 @@
             s->cur_st = st;
             st->cur_ptr = st->cur_pkt.data;
             st->cur_len = st->cur_pkt.size;
-            if (st->need_parsing && !st->parser) {
+            if (st->need_parsing && !st->parser && !(s->flags & AVFMT_FLAG_NOPARSE)) {
                 st->parser = av_parser_init(st->codec->codec_id);
                 if (!st->parser) {
                     /* no parser available: just output the raw packets */
@@ -2139,7 +2142,7 @@
                 st->codec->time_base= st->time_base;
         }
         //only for the split stuff
-        if (!st->parser) {
+        if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE)) {
             st->parser = av_parser_init(st->codec->codec_id);
             if(st->need_parsing == AVSTREAM_PARSE_HEADERS && st->parser){
                 st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;