Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#7290 closed defect (invalid)

avcodec_receive_frame return error, error code is AVERROR(EAGAIN)

Reported by: lpz Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

i want to use ffmpeg to decode a video file. but when i use avcodec_receive_frame, it return -35, pls help me.

Attachments (1)

av.c (3.5 KB) - added by lpz 5 months ago.

Download all attachments as: .zip

Change History (4)

Changed 5 months ago by lpz

comment:1 Changed 5 months ago by lpz

this is the program output:
➜ splayer git:(master) ✗ gcc av.c -lavcodec -lavformat && ./a.out
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/lpz/splayer/splayer/splayer/ii.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.76.100
comment : vid:v02004c20000bclgv09q4do2tlivhiag

Duration: 00:01:44.67, start: 0.000000, bitrate: 308 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], 239 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:

handler_name : VideoHandler?

Stream #0:1(und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
Metadata:

handler_name : SoundHandler?

videoStream = 0
pkt->size = 371. 1
pkt->size = 23171. 0
err ret = -35.-35, -541478725
pkt->size = 372. 1
pkt->size = 4253. 0
err ret = -35.-35, -541478725
pkt->size = 588. 1
pkt->size = 410. 0
err ret = -35.-35, -541478725

comment:2 Changed 5 months ago by cus

  • Resolution set to invalid
  • Status changed from new to closed

It is perfectly normal if avcodec_receive_frame returns EAGAIN, it only means you must feed additional packets to the decoder with avcodec_send_packet before you can receive frames.

Please read the API docs.

comment:3 Changed 5 months ago by cehoyos

  • Component changed from avcodec to undetermined
  • Keywords AVERROR(EAGAIN) removed
  • Type changed from sponsoring request to defect
Note: See TracTickets for help on using tickets.