I've tried manually setting the input parameters in this code which was the
only feedback I got for my last email concerning my UDP problem:
I know the video is MPEG4 and these other values I'm setting because of the
Debug values that come from FFMpeg's AV Log. I get fewer debug statements,
but mFormatContext just isn't getting set up properly still.

AVFormatParameters* fParam = new AVFormatParameters;

fParam->height = 352;

fParam->width = 240;

fParam->pix_fmt=PIX_FMT_YUV420P;

fParam->video_codec_id = CODEC_ID_MPEG4;

AVInputFormat* iFormat = new AVInputFormat;

iFormat = av_find_input_format("mpeg4");

if(av_open_input_file(&mFormatContext,av_filename.toAscii().constData(),iFormat,0,fParam)
== 0)
{
    //find the stream info

    std::cout << "Codec ID: " << mFormatContext->video_codec_id;

    find_stream_result = av_find_stream_info(mFormatContext);

    std::cout << "Codec ID: " << mFormatContext->video_codec_id;

}

It does get to the av_find_stream_info line but it hangs there. When it
prints out what Codec ID it's using before and after that function call,
it's printing out: "Codec ID: 0"

Anybody know what I'm doing wrong here?
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to