malikcis
3rd December 2009, 17:07
You may be able to give some valuable feedback on this:
I am trying to decode a VC-1 elementary stream file with ffmpeg avcodec library.:)
The following code will always fail in avcodec_open() with -1.
It seems to me that some additional data (extradata) is missing but I am not sure.
Do you have an idea on what is missing and how to do this?
Sample code is highly welcome.
/* find the VC-1 video decoder */
codec = avcodec_find_decoder(CODEC_ID_VC1);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
}
c= avcodec_alloc_context();
/* open it */
error_val = avcodec_open(c, codec);//this will fail with -1 error code
if (error_val < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
Thanks, Malik Cisse
I am trying to decode a VC-1 elementary stream file with ffmpeg avcodec library.:)
The following code will always fail in avcodec_open() with -1.
It seems to me that some additional data (extradata) is missing but I am not sure.
Do you have an idea on what is missing and how to do this?
Sample code is highly welcome.
/* find the VC-1 video decoder */
codec = avcodec_find_decoder(CODEC_ID_VC1);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
}
c= avcodec_alloc_context();
/* open it */
error_val = avcodec_open(c, codec);//this will fail with -1 error code
if (error_val < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
Thanks, Malik Cisse