Message ID | 56d1d7e4f0dafdc57958ae561b126afceed3a2de.1472400439.git.tommyhebb@gmail.com |
---|---|
State | Accepted |
Commit | a37e6dd2ba85a44fc283d24f3ee3bdd8abad5b9b |
Headers | show |
On Sun, Aug 28, 2016 at 12:24:55PM -0400, Thomas Hebb wrote: > av_log() expects its first parameter to be a pointer to a struct whose > first element is a pointer to an AVClass. In what I can only imagine is > a typo, one call to av_log() in the AAX decryption code instead passes > a pointer to an AVSHA struct, which doesn't even contain a pointer as > its first element, much less a pointer to an AVClass. Change the call to > pass the current MOVContext, as surrounding calls do. > > The incorrect AVClass was causing mpv to emit the warning "av_log > callback called with bad parameters" when playing an .aax file. > > Signed-off-by: Thomas Hebb <tommyhebb@gmail.com> > --- > libavformat/mov.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) applied thx [...]
diff --git a/libavformat/mov.c b/libavformat/mov.c index 6282d8f..f499906 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -997,7 +997,7 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_INFO, "[aax] file checksum == "); // required by external tools for (i = 0; i < 20; i++) - av_log(sha, AV_LOG_INFO, "%02x", file_checksum[i]); + av_log(c->fc, AV_LOG_INFO, "%02x", file_checksum[i]); av_log(c->fc, AV_LOG_INFO, "\n"); /* verify activation data */
av_log() expects its first parameter to be a pointer to a struct whose first element is a pointer to an AVClass. In what I can only imagine is a typo, one call to av_log() in the AAX decryption code instead passes a pointer to an AVSHA struct, which doesn't even contain a pointer as its first element, much less a pointer to an AVClass. Change the call to pass the current MOVContext, as surrounding calls do. The incorrect AVClass was causing mpv to emit the warning "av_log callback called with bad parameters" when playing an .aax file. Signed-off-by: Thomas Hebb <tommyhebb@gmail.com> --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)