It looks like avcodec_open deprecated for avcodec_open2 . See for example this note. Reading documents in avcodec_open , it looks like the replacement method is to convert:
avcodec_open(a,b);
to
avcodec_open(a,b,NULL);
This fix is โโsimilar to the one proposed but not tested in the untrunc library itself, here .
I tried to verify the fix works. In practice, it was a one-line modification in track.cpp. Take:
if(avcodec_open(codec.context, codec.codec)<0)
and replace it with
if(avcodec_open2(codec.context, codec.codec, NULL)<0)
(when committing 3c708a, this change is on line 218). NOTE. I only checked that the code was compiled, and not that it really worked as intended (I don't have a broken m4v for testing). Let me know if this works, or if you have other problems.
source share