]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mlp_parser.c
tests/fate: add tests for PNG side/meta data
[ffmpeg] / libavcodec / mlp_parser.c
index 9a076f6a7f467bd5d6d4424400137c72a25a07cc..e7162f4aa83cb806a4e4be6b64a00c70dc715ad2 100644 (file)
@@ -61,7 +61,10 @@ static int mlp_parse(AVCodecParserContext *s,
     int ret;
     int i, p = 0;
 
+    s->key_frame = 0;
+
     *poutbuf_size = 0;
+    *poutbuf = NULL;
     if (buf_size == 0)
         return 0;
 
@@ -136,6 +139,8 @@ static int mlp_parse(AVCodecParserContext *s,
          * access unit header and all the 2- or 4-byte substream headers. */
         // Only check when this isn't a sync frame - syncs have a checksum.
 
+        s->key_frame = 0;
+
         parity_bits = 0;
         for (i = -1; i < mp->num_substreams; i++) {
             parity_bits ^= buf[p++];
@@ -159,12 +164,15 @@ static int mlp_parse(AVCodecParserContext *s,
         if (ff_mlp_read_major_sync(avctx, &mh, &gb) < 0)
             goto lost_sync;
 
+        s->key_frame = 1;
+
         avctx->bits_per_raw_sample = mh.group1_bits;
         if (avctx->bits_per_raw_sample > 16)
             avctx->sample_fmt = AV_SAMPLE_FMT_S32;
         else
             avctx->sample_fmt = AV_SAMPLE_FMT_S16;
         avctx->sample_rate = mh.group1_samplerate;
+        avctx->frame_size =
         s->duration = mh.access_unit_size;
 
         if(!avctx->channels || !avctx->channel_layout) {