Opened 4 years ago

Closed 4 years ago

#1240 closed defect (fixed)

regression: "codec frame size is not set" using -acodec copy

Reported by: ste Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: regression ac3 streamcopy framesize
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I try to transcode a MPEG2 file from a DVB-C capture with ffmpeg GIT as of today:

ffmpeg -i test.tmpeg -vcodec libx264 -acodec copy test.mp4

ffmpeg refuses to encode the file with the following error:

[mp4 @ 0x290f6600] track 1: codec frame size is not set

With previous versions, the file encodes fine.
Revision 16e54ac7255d47e70ba9ba60d5ce5d0a0e44b223 introduces the faulty behavior:

    (e)ac3 parser: set duration instead of frame_size

------------------------- libavcodec/aac_ac3_parser.c -------------------------
index 58f30a4..8132ce8 100644
@@ -93,7 +93,7 @@ get_next:
             avctx->channels = s->channels;
             avctx->channel_layout = s->channel_layout;
         }
-        avctx->frame_size = s->samples;
+        s1->duration = s->samples;
         avctx->audio_service_type = s->service_type;
     }

If I re-add setting of the frame size, encoding works fine. There are similar problems with other codecs.
Setting of frame size was removed for several other codecs in the same merge from qatar/master.

Initially, I discovered this problem while using mencoder where there are serious A/V async problems after the commit above.

Attachments (1)

ffmpeg-20120421-120013.log (5.0 KB) - added by ste 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by ste

comment:1 follow-up: Changed 4 years ago by cehoyos

  • Keywords regression added
  • Priority changed from normal to important

Isn't this reproducible with ffmpeg -i test.tmpeg -vn -acodec copy test.mp4 ?

comment:2 in reply to: ↑ 1 Changed 4 years ago by ste

Replying to cehoyos:

Isn't this reproducible with ffmpeg -i test.tmpeg -vn -acodec copy test.mp4 ?

Yes, the same error also occurs with -vn. x264 has nothing to do with it.

comment:3 Changed 4 years ago by michael

  • Keywords ac3 streamcopy framesize added
  • Reproduced by developer set
  • Resolution set to fixed
  • Status changed from new to closed

Will be fixed in git in a moment

Note: See TracTickets for help on using tickets.