Closed michaelni closed 8 years ago
avcodec_parameters_to_context() overwrites the correct width by 0 it seems if that overwrite is prevented then it works
So basically the parser and the decoder are fighting to set the value? What determines the correct value in the first place in this case?
This would mean that codecpar has empty width/height, which is clearly not as designed. I'll look at this in the morning.
putting av_logs in decoder and parser shows both seem to set width to 528 before "Demuxer context update while decoder is open" triggers and things get wiped anyway, Ill leave this to Nevcairiel, he knows that code better
Fixed
I missed this one earlier as i had locally applied my coded_width/height in codecpar patch without that patch for unknown reasons https://samples.ffmpeg.org/MPEG2/vid_0x80.ts fails to have its video stream parameters detected and thus transcoding the video from the file fails
Input #0, mpegts, from 'vid_0x80.ts': Duration: 00:00:01.42, start: 38892.178344, bitrate: 47241 kb/s Program 1 Stream #0:0[0x1e00]: Video: mpeg2video ([128][0][0][0] / 0x0080), yuv420p, 528x480 [SAR 40:33 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn Stream #0:10x1020: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 128 kb/s Stream #0:20x1021: Audio: ac3 ([129][0][0][0] / 0x0081), 0 channels
vs.
Input #0, mpegts, from 'vid_0x80.ts': Duration: 00:00:01.42, start: 38892.178344, bitrate: 47241 kb/s Program 1 Stream #0:0[0x1e00]: Video: mpeg2video ([128][0][0][0] / 0x0080), none, 29.97 fps, 29.97 tbr, 90k tbn Stream #0:10x1020: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 128 kb/s Stream #0:20x1021: Audio: ac3 ([129][0][0][0] / 0x0081), 0 channels