Skip to content

Commit

Permalink
Revert "export: crash if nullptr passed"
Browse files Browse the repository at this point in the history
This reverts commit 4143900.

Actaully, the transcoding reflector doesn't set the export module,
so that it will crash with this. Crasing command:
```
hd-rum-transcode 8M 5004 -c lavc -P 6004 100::
```
  • Loading branch information
MartinPulec committed Sep 10, 2024
1 parent be7dcb6 commit b1cd316
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <assert.h>
#include <dirent.h>
#include <errno.h> // for errno, EEXIST
#include <limits.h>
Expand Down Expand Up @@ -341,7 +340,9 @@ static void process_messages(struct exporter *s) {

void export_audio(struct exporter *s, struct audio_frame *frame)
{
assert(s != NULL);
if(!s){
return;
}

process_messages(s);

Expand All @@ -354,7 +355,9 @@ void export_audio(struct exporter *s, struct audio_frame *frame)

void export_video(struct exporter *s, struct video_frame *frame)
{
assert(s != NULL);
if(!s){
return;
}

process_messages(s);

Expand Down

0 comments on commit b1cd316

Please sign in to comment.