Comments (2)
Good catch.
from ffmpeg-libav-tutorial.
Hi, it is now that I finally find that simply replacing pLocalCodec
with pLocalCodecParameters
might not be a perfect solution. Instead, it might be better to firstly state that when we do the while
loop to read AVPacket
we need to distinguish video track from sound track. Also, when we create pCodecContext
and call avcodec_parameters_to_context
, we must use AVCodec
and AVCodecParameters
from the video track. Thus we need to "remember" them with pCodec
etc. What do you think about?
Btw, could you please explain why do we need avformat_alloc_context()
for *pFormatContext
and why do we need av_frame_unref(pFrame);
? So far, assigning NULL
to *pFormatContext
or remove av_frame_unref
did not cause any problem for me. In chapter 2, AVFormatContext
was assigned like AVFormatContext *input_format_context = NULL;
why this time not avformat_alloc_context()
?
from ffmpeg-libav-tutorial.
Related Issues (20)
- Fix no PTS and delay for realtime streaming
- Misleading tutorial example HOT 3
- Read mp4 DASH from server, decode 16 channel AAC and send to buffer
- A simple question unrelated to this nice tutorial HOT 2
- Unknown decoder 'libx264' HOT 2
- deleted
- 1Gbps means 1 billion bits HOT 1
- fatal error: libavcodec/avcodec.h: No such file or directory HOT 1
- "COM must not be in STA mode\n" HOT 3
- "Broken pipe" on av_interleaved_write_frame when used to stream HOT 2
- ffmpeg
- error in transcoding audio from mp3 to aac HOT 2
- some warnings in 0_hello_world.c
- There is not function named "av_mallocz_array" in the recent ffmpeg library
- avformat_close_input() vs avformat_free_context()
- Compiling on Windows with GCC HOT 1
- define pCodec
- Getting error when running. (Close to the end of the 0-hello-world) HOT 3
- MKV Formatting HOT 3
- doc: format HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffmpeg-libav-tutorial.